home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 1 / Cream of the Crop 1.iso / EDITOR / AMAC44.ARJ / TIM001.QM < prev    next >
Text File  |  1992-02-15  |  11KB  |  204 lines

  1. *                               TIM001.QM
  2. *                        Written By Tom Hogshead
  3. *                        (See TIMER14.QM For Use)
  4. *                                2/15/92
  5. *  Key    Subfile
  6. * =====  =========  =====================================================
  7. * @(1)            --Times Macro Command Sequences For 1 To 100,000 Repeats
  8. *                   (Inserted) In @1 Using [Del_Ch] Timing Counter
  9. *
  10. *   @(_) {TIMER14} Return To TIMER14.QM
  11. *
  12. *--- eoi
  13.  
  14.  
  15.  
  16. * 
  17. * -------------------------------------------------------------------------
  18. * @(1)  Times Macro Command Sequences For 1 To 100,000 Repeats
  19. *       422 bytes Sat  02-15-1992  14:20:18
  20. * -------------------------------------------------------------------------
  21. *
  22. @1  macrobegin
  23.     unmarkblock defaultwordset
  24.     setrmargin "80" return              * For timer messages on same line
  25.     insertline begline dropanchor
  26.     currentfilename copy                * Save currentfilename to return to
  27.     gotocolumn "41" return
  28.     dropanchor begline
  29.     fillblock "*" return                * Insert start line
  30.     editfile "0k" return quit           *
  31.     editfile return
  32.    "Cycle [Y=yes, Enter=no] ?"          * Y for yes, Enter for one cycle only
  33.     cursorright dropanchor
  34.     Pause
  35.     *---------------------------------------------------------------- *
  36.     *  Buffer                    Description                          *
  37.     * ========    =================================================== *
  38.     *     1   -   [Y] or [y] to cycle, [Enter] for only one cycle     *
  39.     *     2   -   Size = no of repeats to time, eg 1k = 1000 repeats  *
  40.     *     3   -   # of lines of counting characters                   *
  41.     *     4   -   # of counting characters per counting line          *
  42.     *     5   -   Character after buff 4 (* for 1/5/50/100 repeats)   *
  43.     *---------------------------------------------------------------- *
  44.     storescrbuff "1" return             * Y, or Enter for one cycle only
  45.     delline                             * Delete message line
  46.     editfile "$repeat" return
  47.     Pause
  48.     delrtword                           * Delete empty space
  49.     markcharacter                       *
  50.     gotocolumn "7" return               * Mark Size
  51.     storescrbuff "2" return             * Size
  52.     wordright                           *
  53.     markword                            *
  54.     storescrbuff "3" return             * # of AddLines
  55.     wordright markword                  *
  56.     storescrbuff "4" return             * Chars per line to delete
  57.     gotoblockend                        *
  58.     unmarkblock                         *
  59.     cursorright                         * Move to empty space
  60.     markcharacter                       * Start mark
  61.     endline                             * Mark buff 5
  62.     storescrbuff "5" return             * Store buff 5, blank if nothing
  63.     quit                                * Quit $repeat
  64.     editfile "$line#" return quit       * Quit $line# if loaded
  65.     editfile paste return               * Return to file we started in
  66.     onewindow
  67.     *--------------------------------------------------------*
  68.     * Window    File              Description                *
  69.     * ======   ======   ==================================== *
  70.     *   1               File to record timing record         *
  71.     *   2      0k       Zero length file to count repeats    *
  72.     *   3      $line#   contains 001-999 for cycle counting  *
  73.     *--------------------------------------------------------*
  74.     horizontalwindow                    * 0k window
  75.     editfile "0k" return
  76.     shrinkwindow
  77.     cursordown cursordown cursordown
  78.     cursordown cursordown cursordown
  79.     escape
  80.     horizontalwindow                    * Cycle # window
  81.     editfile "$line#" return
  82.     endline cursorright cursorright
  83. *-- InsertTime in $line#
  84.     inserttime                          * Insert approx start time in $line#
  85.     getscrbuff "2" return               * Insert size selected
  86.     unmarkblock
  87.     prevwindow                          * 0k window
  88.  CYCLE:
  89.         getscrbuff "3" return               * Get # of addlines
  90.         cut
  91.         begline                             *
  92.         getscrbuff "5" return               * Get buff 5
  93.         endline                             * Test if buff 5 has text
  94.         jfalse L1:                          * If false, buff 5 has no text
  95.         delline                             *ELSE buff has text
  96.         getscrbuff "4" return               * Get # of chars/line to count
  97.         cut                                 * Cut to scrap
  98.         begfile                             *
  99.         markcolumn                          *
  100.         gotocolumn paste return             * Go to end of block
  101.         fillblock "*" return                * Fill with stars
  102.         delch                               * Delete one counting char
  103.                                             * because delch "fail"= 1 rpt
  104. *       Pause                               * Add to see # of repeats - 1
  105.                                             * eg, 4 stars = 5 repeats
  106.         jump REFILL:                        *
  107.    L1:                                      *
  108.         delline                             * Delete extra line from buff 5
  109.         addline                             *
  110.         repeatcmd paste return              * Add lines for counting block
  111.         getscrbuff "4" return               * Get # of chars/line to count
  112.         cut                                 * Cut to scrap
  113.         cursorup cursorup                   * Move up to buff #4 line #
  114.    L2:  gotocolumn paste return             * Go to end of block
  115.         cursorleft                          * Position cursor one column
  116.                                             * left of # of counting chars
  117.                                             * because delch "fail"= 1 rpt
  118.         markcolumn begfile                  * Mark block end/begin
  119. *  L3:  fillblock "*" return jump REFILL:   * Count w/ all stars, for tests
  120. *  L4:  fillblock " " return jump REFILL:   * Empty block, for tests
  121.         fillblock  #248  return                         * °°°°°°°°°
  122.         gotocolumn "101" return fillblock #007 return   * 
  123.         gotocolumn "201" return fillblock #249 return   * ∙∙∙∙∙∙∙∙∙
  124.         gotocolumn "301" return fillblock #250 return   * ·········
  125.         gotocolumn "401" return fillblock "."  return   * .........
  126.  REFILL:
  127.         unmarkblock
  128.         endpara begline
  129.         prevwindow                      * Timing record window
  130.         makectrofscreen
  131.         insertline begline
  132.        "*" gotocolumn "41" return "*"   * Insert starting line of stars
  133.         *-------------------------------------------------------------------*
  134.         * My DiskPark TSR parks my hard disk after 9 minutes of no access.  *
  135.         * I don't want TSR timing interference for > 9 minutes cycling.     *
  136.         * Add these 6 lines if you have TSR disk access during cycling.     *
  137.         *-------------------------------------------------------------------*
  138. *       getscrbuff "1" return     *                                         *
  139. *       endline                   * Test if 'y' to cycle                    *
  140. *       jfalse NOSAVE_FILE:       * If false, are at eol, don't save        *
  141. *       savefile                  *ELSE save file                           *
  142. *       NOSAVE_FILE:              *                                         *
  143. *       cut                       * Remove buffer 1 from screen             *
  144.         *-------------------------------------------------------------------*
  145.         cursorright
  146. * ■■■■■ Timing Starts Here ■■■■■
  147.         Insert_Time
  148.         nextwindow                      * 0k window
  149.         TIME:* 
  150. * **** < Commands to Time (Inserted) Here> ****
  151.         Del_Ch                          * Timing Counter
  152.         jtrue TIME:
  153.         prevwindow                      * Timing record window
  154.         gotocolumn "53" return
  155. *       500_TIME: insertline            * Add to show time after counting line
  156.         deltoeol                        * Delete previous time
  157.         Insert_Time
  158. * ■■■■■ Timing Ends Here ■■■■■
  159.         prevposition                    * Move to first char of time
  160.         delrtword delch                 * Delete 'Hour:'
  161.         nextwindow                      * 0k window
  162. *       begline                         * In case inserted commands move cur
  163.         cursorup                        * Move up to next counting line
  164.         jtrue TIME:                     *  until no more lines to count
  165.         nextwindow                      * Cycle # window
  166.         begline markword jfalse NOFILE: * In case no $line# file            |
  167.         copy                            * Copy current cycle # for timer    |a
  168.  NOFILE: wordright                      *                                   |
  169.         markcolumn endline markcolumn
  170.         gotoblockbeg cursordown
  171.         moveblock                       * Move start Time/Size to next line
  172.         unmarkblock
  173.         begline scrolldown
  174.         nextwindow                      * Timing record window
  175.         endline cursorright cursorright
  176.         insertdate                      * Insertdate
  177.         wordleft delch delch            * Delete 91
  178.         wordleft wordleft wordleft
  179.         delrtword                       * Delete day of week
  180.         endline cursorright "@1"        * Insert macro key
  181.         cursorright                     *
  182.         getscrbuff "2" return           * Insert size
  183.         gotocolumn "77" return          *
  184.         paste                           * Insert current cycle #
  185.         unmarkblock
  186.         nextwindow                      * 0k window
  187.         getscrbuff "1" return           * Get answer to cycle prompt
  188.         endline                         * Test if answered 'y' to cycle
  189.  jtrue CYCLE:                           * If true, are at eol, cycle again
  190.         prevwindow                      * Timing record window
  191.         dropanchor                      * Mark timer to return to
  192.         prevwindow                      * Cycle number window
  193.         quit                            * Quit $line#
  194.         editfile "0k" return quit       * Quit 0k
  195.         gotoblockbeg unmarkblock        * Return to file we started in
  196.         onewindow                       * Close all windows
  197.         begline cursorright cursorright * Position cursor to calculate time
  198. *
  199. * 380 bytes Mon  06-17-1991  21:41:37 (TH @1)
  200. * 380 bytes Fri  06-28-1991  07:26:45 (TH @1)
  201. * 419 bytes Sun  07-07-1991  13:56:04 (TH @1, added 1/5/50/100 repeats)
  202. * 422 bytes Sat  02-15-1992  14:20:18 (TH @1, in case not $line# file |a)
  203.  
  204.